#include "director.h"
#include "iostream"

Director::Director(AbstractBuilder* builder)
{
    this->builder_ = builder;
}

Director::~Director()
{}

void Director::Construct()
{
    if (NULL == this->builder_)
    {
        std::cout << "failed to construct product, builder is NULL!" << std::endl;
        return;
    }
    
    this->builder_->CreateProduct();
    this->builder_->BuildParamA();
    this->builder_->BuildParamB();
    this->builder_->BuildParamC();
}